package com.airline.repository;

import com.airline.entity.Flight;
import org.springframework.data.jpa.repository.JpaRepository;
import java.time.LocalDateTime;
import java.util.List;

public interface FlightRepository extends JpaRepository<Flight, Long> {
    List<Flight> findByDepartureCityAndArrivalCityAndDepartureTimeAfter(
            String departureCity, String arrivalCity, LocalDateTime departureTime);
    List<Flight> findByStatus(String status);
}